from django.conf.urls.defaults import *
from arrrt.homework.feeds import SiteNewsFeed

feeds = {
    'latest': SiteNewsFeed,
}

urlpatterns = patterns('',
    (r'^$', 'arrrt.homework.views.index'),
    (r'^all/$', 'arrrt.homework.views.hwklist'),
#    (r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
    (r'^(?P<object_id>\d+)/$', 'arrrt.homework.views.listdetail'),
    (r'^detail/(?P<object_id>\d+)/$', 'arrrt.homework.views.detail'),
    (r'^logon/', 'arrrt.homework.views.logon'),
    (r'^login/', 'django.views.generic.simple.direct_to_template', {'template': 'login.html'}),
    (r'^logout/', 'arrrt.homework.views.unlogon'),
    (r'^upload/(?P<object_id>\d+)/$', 'arrrt.homework.views.upload'),
    (r'^uploading/', 'arrrt.homework.views.uploadfile'),
    (r'^uploadlist/', 'arrrt.homework.views.uploadlist'),
    (r'^addhwk/', 'arrrt.homework.views.addhwk'),
    (r'^newhwk/', 'arrrt.homework.views.newhwk'),
    (r'^newnews/', 'arrrt.homework.views.newnews'),
    (r'^addnews/', 'arrrt.homework.views.addnews'),
    (r'^news/(?P<object_id>\d+)/$', 'arrrt.homework.views.viewnews'),
    (r'^addclass/', 'arrrt.homework.views.addclass'),
    (r'^newclass/', 'arrrt.homework.views.newclass'),
    (r'^register/', 'arrrt.homework.views.register'),
    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
) 
